home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Trusted Irix /B 4.0.4
/
Trusted-Irix B-4.0.1.iso
/
dist
/
eoe1.idb
/
usr
/
include
/
sys
/
IP12nvram.h.z
/
IP12nvram.h
Wrap
C/C++ Source or Header
|
1992-04-03
|
5KB
|
170 lines
#ident "include/sys/IP12nvram.h: $Revision: 1.6 $"
/*
* IP12nvram.h - the NVRAM offsets, etc.
*/
/*
* non-volatile ram addresses
* note: everything must fit with 128 bytes. the national nmc93cs46
* is arranged as 64 sixteen bit registers.
*/
#define NVLEN_MAX 128
/*
* bootmode controls autoboot/command mode on reset
*/
#define NVOFF_BOOTMODE 0
#define NVLEN_BOOTMODE 1
#define NVRAM_BOOTMODE (NVOFF_BOOTMODE << 2)
/*
* state maintains the current validity of the tod clock and
* non-volatile ram
*/
#define NVOFF_STATE 1
#define NVLEN_STATE 1
#define NVRAM_STATE (NVOFF_STATE << 2)
/*
* netaddr is used by network software to determine the internet
* address, it should be a string containing the appropriate
* network address in "." format. XXX: could easily be in 4 binary bytes
*/
#define NVOFF_NETADDR (NVOFF_STATE + NVLEN_STATE)
#define NVLEN_NETADDR 16
/*
* lbaud/rbaud are the initial baud rates for the duart
*/
#define NVOFF_LBAUD (NVOFF_NETADDR + NVLEN_NETADDR)
#define NVLEN_LBAUD 5
#define NVOFF_RBAUD (NVOFF_LBAUD + NVLEN_LBAUD)
#define NVLEN_RBAUD 5
/*
* console controls what consoles are enabled at power-up
*/
#define NVOFF_CONSOLE (NVOFF_RBAUD + NVLEN_RBAUD)
#define NVLEN_CONSOLE 1
/*
* Startup colors
*/
/* screen */
#define NVOFF_SCCOLOR (NVOFF_CONSOLE + NVLEN_CONSOLE)
#define NVLEN_SCCOLOR 6
/* page */
#define NVOFF_PGCOLOR (NVOFF_SCCOLOR + NVLEN_SCCOLOR)
#define NVLEN_PGCOLOR 6
/* logo */
#define NVOFF_LGCOLOR (NVOFF_PGCOLOR + NVLEN_PGCOLOR)
#define NVLEN_LGCOLOR 6
/*
* for compatability with old nvram
*/
#define NVOFF_PAD0 (NVOFF_LGCOLOR + NVLEN_LGCOLOR)
#define NVLEN_PAD0 2
/*
* register used to hold the checksum.
*/
#define NVOFF_CHECKSUM (NVOFF_PAD0 + NVLEN_PAD0)
#define NVLEN_CHECKSUM 1
/*
* indicate whether we are running as a diskless station or not
*/
#define NVOFF_DISKLESS (NVOFF_CHECKSUM + NVLEN_CHECKSUM)
#define NVLEN_DISKLESS 1
/*
* nokbd indicates if the system is allowed to boot without a keyboard
*/
#define NVOFF_NOKBD (NVOFF_DISKLESS + NVLEN_DISKLESS)
#define NVLEN_NOKBD 1
/*
* bootfile is the initial program loaded on an autoboot
*/
#define NVOFF_BOOTFILE (NVOFF_NOKBD + NVLEN_NOKBD)
#define NVLEN_BOOTFILE 50
#define PASSWD_LEN 8
/*
* password_key is an encrypted key for protecting manual mode
*/
#define NVOFF_PASSWD_KEY (NVOFF_BOOTFILE+NVLEN_BOOTFILE)
#define NVLEN_PASSWD_KEY (2*PASSWD_LEN+1)
/*
* volume is the default audio volume for the system and is also the
* volume at which the boot tune is played. If volume is set to zero,
* then the boot tune is not played. If set to 255, then the boot tune
* is played at full volume.
*/
#define NVOFF_VOLUME (NVOFF_PASSWD_KEY+NVLEN_PASSWD_KEY)
#define NVLEN_VOLUME 3
/* add more read/write variables here ^ */
#define NVOFF_CMD (NVOFF_VOLUME+NVLEN_VOLUME)
#define NVLEN_CMD (NVFUSE_START-NVOFF_CMD)
#define NVOFF_LAST (NVOFF_CMD+NVLEN_CMD)
/* total length of used read/write nv ram */
#define NVRW_TOTAL (NVOFF_LAST)
/*
* EVERYTHING PAST THIS POINT WILL BE WRITE PROTECTED
*
* The write protected nvram is allocated in reverse order starting
* at the end of nvram.
*/
/*
* ethernet physical address
*/
#define NVLEN_ENET 6
#define NVOFF_ENET (NVLEN_MAX-NVLEN_ENET)
/* add more write protected variables here ^ */
/* low address of write protected nvram */
#define NVFUSE_START NVOFF_ENET
#if NVRW_TOTAL > NVFUSE_START
# include "error -- non-volatile ram overflow"
#endif
/* Control opcode for nonvolatile ram on IP12 */
#define SER_READ 0xc000 /* serial memory read */
#define SER_WEN 0x9800 /* write enable before prog modes */
#define SER_WRITE 0xa000 /* serial memory write */
#define SER_WRALL 0x8800 /* write all registers */
#define SER_WDS 0x8000 /* disable all programming */
#define SER_PRREAD 0xc000 /* read protect register */
#define SER_PREN 0x9800 /* enable protect register mode */
#define SER_PRCLEAR 0xffff /* clear protect register */
#define SER_PRWRITE 0xa000 /* write protect register */
#define SER_PRDS 0x8000 /* disable protect register, forever */
/* maximum length of an nvram entry name (e.g. "netaddr", "bootfile") */
#define MAXNVNAMELEN 16
#ifdef LANGUAGE_C
/* format used to store nvram table information
*/
struct nvram_entry {
char nt_name[MAXNVNAMELEN]; /* string name of entry */
char *nt_value; /* PROM: string for default value */
/* UNIX: current value of entry */
int nt_nvaddr; /* offset to entry in nvram */
int nt_nvlen; /* length of entry in nvram */
};
#endif /* LANGUAGE_C */